Optimal. Leaf size=97 \[ -\frac {11 x}{2 a^3}+\frac {3 \sin (c+d x)}{a^3 d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {2 \sin (c+d x)}{3 a^3 d (1+\cos (c+d x))^2}+\frac {19 \sin (c+d x)}{3 a^3 d (1+\cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3957, 2953,
3045, 2717, 2715, 8, 2729, 2727} \begin {gather*} \frac {3 \sin (c+d x)}{a^3 d}-\frac {\sin (c+d x) \cos (c+d x)}{2 a^3 d}+\frac {19 \sin (c+d x)}{3 a^3 d (\cos (c+d x)+1)}-\frac {2 \sin (c+d x)}{3 a^3 d (\cos (c+d x)+1)^2}-\frac {11 x}{2 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 2727
Rule 2729
Rule 2953
Rule 3045
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sin ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=-\int \frac {\cos ^3(c+d x) \sin ^2(c+d x)}{(-a-a \cos (c+d x))^3} \, dx\\ &=-\frac {\int \frac {\cos ^3(c+d x) (-a+a \cos (c+d x))}{(-a-a \cos (c+d x))^2} \, dx}{a^2}\\ &=-\frac {\int \left (\frac {5}{a}-\frac {3 \cos (c+d x)}{a}+\frac {\cos ^2(c+d x)}{a}+\frac {2}{a (1+\cos (c+d x))^2}-\frac {7}{a (1+\cos (c+d x))}\right ) \, dx}{a^2}\\ &=-\frac {5 x}{a^3}-\frac {\int \cos ^2(c+d x) \, dx}{a^3}-\frac {2 \int \frac {1}{(1+\cos (c+d x))^2} \, dx}{a^3}+\frac {3 \int \cos (c+d x) \, dx}{a^3}+\frac {7 \int \frac {1}{1+\cos (c+d x)} \, dx}{a^3}\\ &=-\frac {5 x}{a^3}+\frac {3 \sin (c+d x)}{a^3 d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {2 \sin (c+d x)}{3 a^3 d (1+\cos (c+d x))^2}+\frac {7 \sin (c+d x)}{a^3 d (1+\cos (c+d x))}-\frac {\int 1 \, dx}{2 a^3}-\frac {2 \int \frac {1}{1+\cos (c+d x)} \, dx}{3 a^3}\\ &=-\frac {11 x}{2 a^3}+\frac {3 \sin (c+d x)}{a^3 d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {2 \sin (c+d x)}{3 a^3 d (1+\cos (c+d x))^2}+\frac {19 \sin (c+d x)}{3 a^3 d (1+\cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 177, normalized size = 1.82 \begin {gather*} -\frac {\sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (1980 d x \cos \left (\frac {d x}{2}\right )+1980 d x \cos \left (c+\frac {d x}{2}\right )+660 d x \cos \left (c+\frac {3 d x}{2}\right )+660 d x \cos \left (2 c+\frac {3 d x}{2}\right )-3216 \sin \left (\frac {d x}{2}\right )+1326 \sin \left (c+\frac {d x}{2}\right )-2012 \sin \left (c+\frac {3 d x}{2}\right )-498 \sin \left (2 c+\frac {3 d x}{2}\right )-135 \sin \left (2 c+\frac {5 d x}{2}\right )-135 \sin \left (3 c+\frac {5 d x}{2}\right )+15 \sin \left (3 c+\frac {7 d x}{2}\right )+15 \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{960 a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 87, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2 \left (-\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-11 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) | \(87\) |
default | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2 \left (-\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-11 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) | \(87\) |
risch | \(-\frac {11 x}{2 a^{3}}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{3} d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{3} d}+\frac {2 i \left (21 \,{\mathrm e}^{2 i \left (d x +c \right )}+36 \,{\mathrm e}^{i \left (d x +c \right )}+19\right )}{3 a^{3} d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(126\) |
norman | \(\frac {-\frac {11 x}{2 a}+\frac {11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {56 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {16 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )}{3 a d}-\frac {11 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {11 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} a^{2}}\) | \(135\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 164, normalized size = 1.69 \begin {gather*} \frac {\frac {3 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {7 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{3} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {18 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{3}} - \frac {33 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.78, size = 99, normalized size = 1.02 \begin {gather*} -\frac {33 \, d x \cos \left (d x + c\right )^{2} + 66 \, d x \cos \left (d x + c\right ) + 33 \, d x + {\left (3 \, \cos \left (d x + c\right )^{3} - 12 \, \cos \left (d x + c\right )^{2} - 71 \, \cos \left (d x + c\right ) - 52\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} + 2 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sin ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 96, normalized size = 0.99 \begin {gather*} -\frac {\frac {33 \, {\left (d x + c\right )}}{a^{3}} - \frac {6 \, {\left (7 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{3}} + \frac {2 \, {\left (a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 18 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a^{9}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.06, size = 115, normalized size = 1.19 \begin {gather*} -\frac {2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-38\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-42\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+12\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+33\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (c+d\,x\right )}{6\,a^3\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________